
//某公司要开发新游戏,使用面向对象的思想设计英雄类(Hero)，怪兽类(Monster)和武器(Weapon)。
public class Demo2 {

	public static void main(String[] args) {
		Hero a = new Hero();
		a.heroClass = "英雄类";
		a.heroName = "李小侠";
		a.heroHealth = 800;
		a.num1();
		Weapon b = new Weapon();
		b.weaponClass = "武器类";
		b.weaponName = "死神镰刀";
		b.weaponHealth = 100;
		b.num1();
		Monster c = new Monster();
		c.monsterClass = "怪兽类";
		c.monsterName = "小龟";
		c.monsterHealth = 300;
		c.type = "潜水类";
		c.num1();
	}

}
